package com.wing.warehouse.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.warehouse.model.entity.MoveDownWarehouse;
import com.wing.warehouse.model.request.MoveDownWarehouseForm;
import com.wing.warehouse.model.response.MoveGoodsListVO;
import com.wing.warehouse.model.response.MoveWareHouseKuVO;
import com.wing.warehouse.model.response.MoveDownWarehouseVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 移库下货记录-Service
 *
 * @author
 */
public interface MoveDownWarehouseService extends IService<MoveDownWarehouse> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<MoveDownWarehouseVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<MoveDownWarehouseVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 获取当前仓库的库位信息
     * @param params
     * @return
     */
    List<MoveWareHouseKuVO> getNowKuWeiInfo(@Param("params") Map<String, Object> params);

    /**
     * 获取当前仓库的料箱信息
     * @param params
     * @return
     */
    List<MoveWareHouseKuVO> getNowLiaoXiangInfo(@Param("params") Map<String, Object> params);

    /**
     * 保存下货记录
     * @param moveDownWarehouseForm
     */
    JsonResult saveMoveWarehouse(MoveDownWarehouseForm moveDownWarehouseForm);

    /**
     * 添加调拨任务
     * @param moveDownWarehouseForm
     */
    int add(MoveDownWarehouseForm moveDownWarehouseForm);

    /**
     *  -app
     * @param params
     *
     * @return
     */
    Page<MoveGoodsListVO> getGoodsList(@Param("page") Page<MoveGoodsListVO> page, Map<String, Object> params);
    
    int cancel(Long id);

    MoveDownWarehouseVO getDetailById(Long id);
}
